<form ng-class="{'submitted': submitted}" ng-submit="$ctrl.saveEmployee()">
    <div class="card">
        <div id="attributeSetId_{{$ctrl.attrData.attributeSetId}}" class="card-body show">
            <div class="row">
                <div class="col-sm-12">
                    <div ng-repeat="value in $ctrl.attrData.values | orderBy:'priority' track by $index">
                        <div ng-switch="value.field.name">
                            <!-- QR Code -->
                            <div ng-switch="value.field.name">
                                <div class="text-muted row" ng-switch-when="qr_code">
                                    <div class="col-3">
                                        <h6>QR Code</h6>
                                    </div>
                                    <div class="col-9">
                                        <qr-code class="qr-code-container"  model="value.stringValue"></qr-code>
                                    </div>
                                </div>

                                <div class="text-muted row" ng-switch-when="avatar">
                                    <div class="col-3">
                                        <h6>Avatar</h6>
                                    </div>
                                    <div class="col-9">
                                        <upload-croppie src-url="value.stringValue" src="value.stringValue" posted-file="$ctrl.mediaFile"></upload-croppiee>
                                    </div>
                                </div>
                                <div class="text-muted" ng-switch-default>
                                    <attribute-value-editor attribute-value="value" is-show-title="'true'"
                                        parent-type="'1'" parent-id="$ctrl.attrData.id"></attribute-value-editor>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="card-footer">
            <button type="button" ng-click="$ctrl.saveEmployee()" class="btn btn-sm btn-primary btn-round float-right px-4"
                ng-disabled="$ctrl.isBusy">
                <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"
                    ng-if="$ctrl.isBusy"></span>
                <i class="fas fa-save" ng-if="!$ctrl.isBusy"></i> Save current</button>
        </div>
    </div>
</form>